package schoolword;

import java.io.*;

public class Text3 {
    public static void main(String[] args) throws IOException {
        File file = new File("D:\\wenjianjia\\demo02.txt");
        FileReader fr = new FileReader(file);
        //缓冲流
        BufferedReader br = new BufferedReader(fr);
        String str;
        StringBuffer sb = new StringBuffer();
        while ((str = br.readLine()) != null) {
            //str = br.readLine();
            sb.append(str);
            sb.append("\n");
        }
        System.out.println(sb.toString());
        br.close();
        fr.close();

    }
}
